import service from '@/utils/request'

// @Tags ProductStyles
// @Summary 创建款式资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductStyles true "创建款式资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /productStyles/createProductStyles [post]
export const createProductStyles = (data) => {
  return service({
    url: '/productStyles/createProductStyles',
    method: 'post',
    data
  })
}

// @Tags ProductStyles
// @Summary 删除款式资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductStyles true "删除款式资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /productStyles/deleteProductStyles [delete]
export const deleteProductStyles = (params) => {
  return service({
    url: '/productStyles/deleteProductStyles',
    method: 'delete',
    params
  })
}

// @Tags ProductStyles
// @Summary 批量删除款式资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除款式资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /productStyles/deleteProductStyles [delete]
export const deleteProductStylesByIds = (params) => {
  return service({
    url: '/productStyles/deleteProductStylesByIds',
    method: 'delete',
    params
  })
}

// @Tags ProductStyles
// @Summary 更新款式资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductStyles true "更新款式资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /productStyles/updateProductStyles [put]
export const updateProductStyles = (data) => {
  return service({
    url: '/productStyles/updateProductStyles',
    method: 'put',
    data
  })
}

// @Tags ProductStyles
// @Summary 用id查询款式资讯
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.ProductStyles true "用id查询款式资讯"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /productStyles/findProductStyles [get]
export const findProductStyles = (params) => {
  return service({
    url: '/productStyles/findProductStyles',
    method: 'get',
    params
  })
}

// @Tags ProductStyles
// @Summary 分页获取款式资讯列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取款式资讯列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /productStyles/getProductStylesList [get]
export const getProductStylesList = (params, donNotShowLoading = true) => {
  return service({
    url: '/productStyles/getProductStylesList',
    method: 'get',
    donNotShowLoading: donNotShowLoading,
    params
  })
}

export const getAccessoryNumberDocumentUsedStyle = (params, donNotShowLoading = true) => {
  return service({
    url: '/accessoryNumberDocument/getAccessoryNumberDocumentUsedStyle',
    method: 'get',
    donNotShowLoading: donNotShowLoading,
    params
  })
}

/**
 * @Tags ProductStyles
 * 款式资讯时间计划生成规则
 */
export const generateProductStylesPlan = (data) => {
  return service({
    url: '/productStyles/generateProductStylesPlan',
    method: 'post',
    data
  })
}
/**
 * 获取本厂款号
 */
export const getGenLocalStyleNum = (data) => {
  return service({
    url: '/productStyles/genLocalStyleNum',
    method: 'post',
    donNotShowLoading: true,
    data
  })
}
/**
 * 查询 排除已经绑定产品规格和草稿状态的款式列表
 */
export const getProductStylesQuickList = (params) => {
  return service({
    url: '/productStyles/getProductStylesQuickList',
    method: 'get',
    donNotShowLoading: true,
    params
  })
}

export const exportToSap2 = (params,path) => {
  return service({
    // url: '/masterBOM/exportToSap',
    url: path,
    method: 'get',
    donNotShowLoading: true,
    params
  })
}

/**
 *  */
 export const exportToSapLog = (params,path) => {
  return service({
    // url: '/masterBOM/exportToSapStepLog',
    url: path,
    method: 'get',
    donNotShowLoading: true,
    params
  })
}
/**
 * S
 */
 export const exportToSapLogExport = (params,path) => {
  return service({
    // url: '/masterBOM/exportToSapLogExport',
    url:path,
    method: 'get',
    donNotShowLoading: true,
    params
  })
}